10th computer science chapter 2 exercise